<template>
  <div class="div_right_message_me">
    <el-row>
      <el-col :span="23">
        <div class="grid-content bg-purple el_col_msg">
          <div class="div_right_message_me_name" v-if="obj.username!==''">
            <!--          这里应该是自己的信息. -->
            {{ obj.username }}
          </div>
          <div class="div_right_message_me_name" v-if="obj.username===''">
            <!--          这里应该是自己的信息. -->
            {{ this.$store.state.userInfo.username }}
          </div>
          <!--          v-loading="ack === -1"-->
          <div>
            <!--        这里添加感叹号.-->
            <div v-if="obj.ack === -2" class="div_right_message_send_no_ack" style="vertical-align: top">
              <el-icon color="#e03131">
                <InfoFilled/>
              </el-icon>
            </div>
            <div class="div_right_message_me_msg" style="vertical-align: top">
              {{ obj.body }}
            </div>
          </div>

        </div>
      </el-col>

      <el-col :span="1">
        <div class="grid-content bg-purple-light">
          <div class="div_right_message_me_photo">
            <img v-if="obj.img_url ===''" class="div_right_message_me_photo_img" :src="this.$store.state.userInfo.img_url" alt="">
            <img v-if="obj.img_url !==''" class="div_right_message_me_photo_img" :src="obj.img_url" alt="">
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>

import {InfoFilled} from "@element-plus/icons"
// import VueElementLoading from 'vue-element-loading'

export default {
  name: "message_me",
  components: {
    InfoFilled
  },
  props: ['obj'],
  mounted() {
  },
}
</script>

<style scoped>

.div_right_message_me {
  text-align: right;
  margin-right: 16px;
  margin-bottom: 20px;
  margin-top: 16px;
}

.div_right_message_me_photo {
  display: inline-block;
}

.div_right_message_me_msg {
  display: inline-block;
  background-color: #eeeeee;
  border-radius: 5px;
  padding: 8px 10px 10px 8px;
}

.div_right_message_me_photo_img {
  border-radius: 4px;
  width: 32px;
  height: 32px;
}

.div_right_message_me_name {
  margin-top: -2px;
  font-weight: 400;
  font-size: 12px;
  color: #7a7b7b;
  margin-bottom: 4px;
}

.el_col_msg {
  margin-left: 55px;
}

.div_right_message_send_no_ack {
  display: inline-block;
  margin-top: 10px;
}

/* 设置下宽高以及边框看下效果.*/
</style>